<!--[if lte IE 8]><script>document.createElement('header');document.createElement('footer');</script><![endif]-->
<header id="header2012" class="ui-header util-clearfix">
    <?php include('header_top.php');?>
    <div class="ui-header-main util-clearfix">
        <div class="ui-header-logo">
            <a title="<?php echo $this->config->item('www_name'); ?>" href="<?php echo $this->config->base_url(); ?>"><?php echo $this->config->item('www_name'); ?></a>
        </div>
        <div id="header-extend" class="ui-header-extend">
            <!--for ie7-->
        </div>
        <div id="header-anchor" class="ui-header-anchor">
            <span class="ui-header-anchor-text"></span> 
            <a class="ui-header-anchor-link" target="_blank" href=""></a>
        </div>
        <div id="header-action" class="ui-header-action util-clearfix">
            <span class="ui-header-action-sep"></span> 
            <!--<a class="ui-header-action-rfq" href="" target="_blank"></a>-->
        </div>
        <div id="mod-searchbar"
            class="ui-searchbar ui-searchbar-full ui-header-searchbar ui-searchbar-mod-type ui-searchbar-mod-advanced">
            <form method="get" id="searchbar-form" action="<?php echo $this->config->base_url('search');?>">
                <div id="searchbar-type" class="ui-searchbar-type">
                    <div class="ui-searchbar-type-value">
                        <span id="searchbar-type-display" class="ui-searchbar-type-display">文档</span>
                        <span class="ui-searchbar-arrow ui-searchbar-arrow-down ui-searchbar-type-arrow"></span>
                    </div>
                    <ul id="searchbar-type-options" class="ui-searchbar-type-options" style="visibility: hidden;">
                        <li class="ui-searchbar-type-option"><a>文档</a></li>
                        <li class="ui-searchbar-type-option"><a>标题</a></li>
                        <li class="ui-searchbar-type-option"><a>全文</a></li>
                    </ul>
                </div>
                
                <div class="ui-searchbar-main">
                    <input type="text" id="SearchTextIdx"
                        class="ui-searchbar-keyword" name="s"
                        autocomplete="off" x-webkit-speech="x-webkit-speech"
                        x-webkit-grammar="builtin:translate" lang="en" />
                    <div id="searchbar-related" class="ui-searchbar-related"
                        style="display: none;"></div>
                    <div id="searchbar-static"
                        class="ui-searchbar-keyword-panel ui-searchbar-static"
                        style="display: none;">
                        <strong class="ui-searchbar-static-title util-clearfix">Popular
                            Searches:</strong>
                        <div id="searchbar-static-content"
                            class="ui-searchbar-static-content">
                            <a href="">electric scooter</a>,
                        </div>
                    </div>
                    <div id="searchbar-dynamic"
                        class="ui-searchbar-keyword-panel ui-searchbar-dynamic"
                        style="display: none;"></div>
                </div>
                <input type="submit" id="searchbar-submit"
                    class="ui-searchbar-submit" value="搜索" />

            </form>
        </div>
    </div>
</header>
<script>
var timeout    = 200;
var closetimer = 0;
var ddmenuitem = 0;
function jsddm_open() {	
	jsddm_canceltimer();jsddm_close();
	ddmenuitem = $("#searchbar-type-options").css('visibility', 'visible');
}

function jsddm_close() {
	if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');
}
function jsddm_timer() {
	closetimer = window.setTimeout(jsddm_close, timeout);
}
function jsddm_canceltimer() {
	if(closetimer) {	
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}
$(document).ready(function(){
	$('.ui-searchbar-type-value').bind('mouseover', jsddm_open);
	$('.ui-searchbar-type-value').bind('mouseout', jsddm_timer);
	$('#searchbar-type-options > li').bind('mouseover', jsddm_open);
	$('#searchbar-type-options > li').bind('mouseout', jsddm_timer);
});
</script>